 <div class="modal-dialog">
		      <div class="modal-content">
		         <div class="modal-header">
		            <button type="button" class="close" 
		               data-dismiss="modal" aria-hidden="true">
		                  &times;
		            </button>
		            <h4 class="modal-title" id="myModalLabel">
		               	添加或者修改菜单功能信息
		            </h4>
		         </div>
		         <div class="modal-body">
		            <form class="form-horizontal" role="form" id="addMenuForm">
						 <input type="hidden" name="id" value="${(menu.id)!}"/>
						 <div class="form-group">
								<label class="col-sm-3 control-label no-padding-right" for="form-field-1">上级菜单</label>
								<div class="col-sm-7">
									 <select class="col-sm-7" name="pid">
									  	 <#list menus as m>
									  	 	<#if menu??>
									  	 	<#if menu.pid==m.id>
								         		<option value="${m.id}" selected>${m.value}</option>
								         		<#else>
								         		<option value="${m.id}">${m.value}</option>
								         	</#if>
								         	   <#else>
								         	   <option value="${m.id}">${m.value}</option>
								         	</#if>
								         </#list>
								     </select>
								</div>
							</div>
							<div class="form-group">
								<label class="col-sm-3 control-label no-padding-right" for="form-field-1">菜单名称</label>
								<div class="col-sm-7">
								     <input type="text" name="name" id="form-field-1" class="col-xs-7 col-sm-7" value="${(menu.name)!}"
								     data-rule-required="true" data-msg-required="菜单名称必填">
								</div>
							</div>
							<div class="form-group">
								<label class="col-sm-3 control-label no-padding-right" for="form-field-1">URL地址</label>
								<div class="col-sm-7">
								     <input type="text" name="url" id="form-field-1" class="col-xs-7 col-sm-7" value="${(menu.url)!}"
								     data-rule-required="true" data-msg-required="URL地址必填">
								</div>
							</div>
							<div class="form-group">
								<label class="col-sm-3 control-label no-padding-right" for="form-field-1">是否显示</label>
								<div class="col-sm-6">
									 <select class="col-sm-5" name="isShow">
									 	<#if menu??>
									 	<#if menu.isShow=="y">
									  	 	<option value="y" selected>显示</option>
									  	 	<option value="n">隐藏</option>
									  	 	<#else>
									  	 	<option value="y">显示</option>
										  	<option value="n" selected>隐藏</option>
									  	</#if>
									  	<#else>
										  	<option value="y" selected>显示</option>
										  	<option value="n">隐藏</option>
										 </#if>
								       
								     </select>
								</div>
							</div>
							<div class="form-group">
								<label class="col-sm-3 control-label no-padding-right">排序序号</label>
								<div class="col-sm-7">
								     <input type="text" name="seq" class="col-xs-4 col-sm-4" value="${(menu.sortSeq)!}"
								     data-rule-required="true" data-msg-required="排序序号必填"
								     data-rule-isIntGteZero="true" data-msg-isIntGteZero="排序序号须大于等于0"
								     >
								</div>
							</div>
							<div class="form-group">
								<label class="col-sm-3 control-label no-padding-right" for="form-field-1">ICON图标</label>
								<div class="col-sm-7">
								    <!--  <input type="text" name="icon" class="col-xs-7 col-sm-7" value="${(menu.icon)!}"
								     data-rule-required="true" data-msg-required="ICON图标必选"
								     > -->
								      <select class="col-sm-5" name="icon" icon="${(menu.icon)!}" id="icon" data-rule-required="true" data-msg-required="ICON图标必选">
								      	<option value="icon-adjust">icon-adjust</option>
										<option value="icon-asterisk">icon-asterisk</option>
										<option value="icon-circle">icon-ban-circle</option>
										<option value="icon-bar-chart">icon-bar-chart</option>
										<option value="icon-barcode">icon-barcode</option>
										<option value="icon-beaker">icon-beaker</option>
										<option value="icon-beer">icon-beer</option>
										<option value="icon-bell">icon-bell</option>
										<option value="icon-bell-alt">icon-bell-alt</option>
										<option value="icon-bolt">icon-bolt</option>
										<option value="icon-book">icon-book</option>
										<option value="icon-bookmark">icon-bookmark</option>
										<option value="icon-bookmark-empty">icon-bookmark-empty</option>
										<option value="icon-briefcase">icon-briefcase</option>
										<option value="icon-bullhorn">icon-bullhorn</option>
										<option value="icon-calendar">icon-calendar</option>
										<option value="icon-camera">icon-camera</option>
										<option value="icon-camera-retro">icon-camera-retro</option>
										<option value="icon-certificate">icon-certificate</option>
										<option value="icon-check">icon-check</option>
										<option value="icon-check-empty">icon-check-empty</option>
										<option value="icon-circle">icon-circle</option>
										<option value="icon-circle-blank">icon-circle-blank</option>
										<option value="icon-cloud">icon-cloud</option>
										<option value="icon-cloud-download">icon-cloud-download</option>
										<option value="icon-cloud-upload">icon-cloud-upload</option>
										<option value="icon-coffee">icon-coffee</option>
										<option value="icon-cog">icon-cog</option>
										<option value="icon-cogs">icon-cogs</option>
										<option value="icon-comment">icon-comment</option>
										<option value="icon-comment-alt">icon-comment-alt</option>
										<option value="icon-comments">icon-comments</option>
										<option value="icon-comments-alt">icon-comments-alt</option>
										<option value="icon-credit-card">icon-credit-card</option>
										<option value="icon-dashboard">icon-dashboard</option>
										<option value="icon-desktop">icon-desktop</option>
										<option value="icon-download">icon-download</option>
										<option value="icon-download-alt">icon-download-alt</option>
										<option value="icon-edit">icon-edit</option>
										<option value="icon-envelope">icon-envelope</option>
										<option value="icon-envelope-alt">icon-envelope-alt</option>
										<option value="icon-exchange">icon-exchange</option>
										<option value="icon-exclamation-sign">icon-exclamation-sign</option>
										<option value="icon-external-link">icon-external-link</option>
										<option value="icon-eye-close">icon-eye-close</option>
										<option value="icon-eye-open">icon-eye-open</option>
										<option value="icon-facetime-video">icon-facetime-video</option>
										<option value="icon-fighter-jet">icon-fighter-jet</option>
										<option value="icon-film">icon-film</option>
										<option value="icon-filter">icon-filter</option>
										<option value="icon-fire">icon-fire</option>
										<option value="icon-flag">icon-flag</option>
										<option value="icon-folder-close">icon-folder-close</option>
										<option value="icon-folder-open">icon-folder-open</option>
										<option value="icon-folder-close-alt">icon-folder-close-alt</option>
										<option value="icon-folder-open-alt">icon-folder-open-alt</option>
										<option value="icon-food">icon-food</option>
										<option value="icon-gift">icon-gift</option>
										<option value="icon-glass">icon-glass</option>
										<option value="icon-globe">icon-globe</option>
										<option value="icon-group">icon-group</option>
										<option value="icon-hdd">icon-hdd</option>
										<option value="icon-headphones">icon-headphones</option>
										<option value="icon-heart">icon-heart</option>
										<option value="icon-heart-empty">icon-heart-empty</option>
										<option value="icon-home">icon-home</option>
										<option value="icon-inbox">icon-inbox</option>
										<option value="icon-info-sign">icon-info-sign</option>
										<option value="icon-key">icon-key</option>
										<option value="icon-leaf">icon-leaf</option>
										<option value="icon-laptop">icon-laptop</option>
										<option value="icon-legal">icon-legal</option>
										<option value="icon-lemon">icon-lemon</option>
										<option value="icon-lightbulb">icon-lightbulb</option>
										<option value="icon-lock">icon-lock</option>
										<option value="icon-unlock">icon-unlock</option>
								     </select>
								     <i style="padding-left:5px" class="${(menu.icon)!} bigger-150" id="i_icon"></i>
								</div>
							</div>
						  <div class="form-group">
								<label class="col-sm-3 control-label no-padding-right" for="form-field-1">备注信息</label>
								<div class="col-sm-5">
									  <textarea class="form-control limited col-sm-5" name="detail">${(menu.descr)!}</textarea>
								</div>
							</div>
						</form>
		         </div>
		         <div class="modal-footer">
		            <button type="button" class="btn btn-warning" 
		               data-dismiss="modal">关闭
		            </button>
		            <button type="button" class="btn btn-primary" id="addMenuSubmitBtn">
		               	确认添加或修改
		            </button>
		         </div>
	 </div><!-- /.modal-content -->
	</div>
<script>
(function($){
	$(function(){
		  $("#addMenuForm").validate();
		   initData();
		});
		function initData(){
			var $icon = $("#icon");
			     if($icon.attr("icon")==""){
				 	$("#icon option:eq(0)").attr("selected",true)
				 	$("#i_icon").attr("class",$icon.find("option:selected").val() +" bigger-150");
			  }else{
				   $icon.find("option[value='"+$icon.attr("icon")+"']").attr("selected",true);
			  }
		     $icon.change(function(){
		   	  $("#i_icon").attr("class", $("#icon").find("option:selected").val() +" bigger-150");
		     })
		}
})($)

</script>